package P119_StopMethodIsUnreliable;

/**
 * @ClassName : StopMethodIsUnreliable
 * @Description : 线程启动前stop方法是不可靠的
 * @Author : wukj1
 * @Date: 2022/5/6
 **/
public class StopMethodIsUnreliable {

    public static void main(String[] args) {
        while(true){
            SpamMachine spamMachine = new SpamMachine();
            if(!false){
                //设置线程为不可启用状态
                spamMachine.stop();
            }
            spamMachine.start();
        }
    }

}

//垃圾右键制造机
class SpamMachine extends Thread{

    @Override
    public void run() {
        System.out.println("制造大量垃圾邮件......");
    }

}
